package com.wang.tool.trace;

import org.springframework.context.annotation.Import;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 开启trace透传
 * 支持web
 * 支持线程池
 *
 * @Author wangshaopeng
 * @Date 2020/12/28
 */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
@Import({TraceRegister.class})
public @interface EnableTrace {

    /**
     * trace传送器
     *
     * @return
     */
    Class<? extends TraceTransmitter> traceTransmitter() default SimpleTraceTransmitter.class;


    /**
     * trace构建器
     *
     * @return
     */
    Class<? extends TraceBuilder> traceBuilder() default SimpleTraceBuilder.class;


}
